<template>
	<view class="page">
		<!-- <image src="https://hzybucket.obs.cn-south-1.myhuaweicloud.com/we_chat/top-bg.png" class="bg-color"
			mode="aspectFill"></image> -->
		<z-paging ref="paging">
			<uv-navbar slot="top" autoBack :fixed="true" title="公司介绍" placeholder></uv-navbar>

			<!-- 内容 -->
			<view class="contnet ios">
				<view class="rich-text" v-html="introduction"></view>
			</view>

		</z-paging>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 公司介绍
				introduction: '',
			}
		},
		onLoad() {
			this.getData()
		},
		methods: {
			getData() {
				this.$Api.wxHomepageData({
					type: 1,
					page: 1,
					num: 1
				}).then((res) => {
					console.log(res, '小程序配置数据');
					if (res.code == 200) {
						const regex = new RegExp('img', 'gi');
						res.data.list[0].content = res.data.list[0].content.replace(regex,
							`img style="max-width:100%;object-fit: cover;"`);
						res.data.list[0].content = res.data.list[0].content.replace(/<p>/g, '<p style="margin: 16px 0px;">');
						this.introduction = res.data.list[0].content;
					}
				}).catch((err) => {});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.contnet {
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-bottom: 26rpx;

		.rich-text {
			width: 100%;
			padding: 0 10rpx;
		}
	}
</style>